eval-section section-list symbol-affix how structure-pattern
With eval-section you can simulate the structuring protocol employed in the Class System.
Look at this short prelude modelled on Bach's C major prelude to see how it can operate.
; prelude 1b
(setq a (activate-tonality (c maj 1 1 4))
b (activate-tonality (d min 1 1 4))
c (activate-tonality (a min 1 1 3))
d (activate-tonality (a maj 1 1 3))
e (activate-tonality (b& maj 1 1 3))
f (activate-tonality (f maj 1 1 3))
g (activate-tonality (g min 1 1 3))
h (activate-tonality (c maj 7 1 4))
i (activate-tonality (e maj 7 3 4))
j (activate-tonality (g maj 1 5 3))
k (activate-tonality (g maj 7 1 4))
)
(setq ax '(= = c d f c d f)
bx (append '(= =) (symbol-shuffle '(c d f c d f)))
cx (append '(= =) (symbol-shuffle '(c d f c d f)))
dx (append '(= =) (symbol-shuffle '(c d f c d f)))
ex ax
fx bx
gx (symbol-scale '(c g) cx)
hx (symbol-mix dx gx)
ix ax
jx (find-change bx)
kx (find-change cx)
)
(def-symbol
pn1 (eval-section
'(a b c d e f g h f g i d b j k a) 'x 'append)
pn2 '(= b)
pn3 '(e)
)
The structure-pattern of the tonality sequence is the symbol-list above. eval-selection merges the affix-symbol x with each letter of the list. This list now replicates the symbol variables; it is evaluated and the how either lists or appends the output of each variable.
(def-length
pn1 '(1/16)
pn2 '(1/16 7/16)
pn3 '(8/16)
)
(def-velocity
default '(96 86 76 64 84 64 72 54)
)
(def-zone
default (symbol-repeat 16 '(2/4))
)
(def-tonality
default (eval-list '(a b c d e f g h f g i d b j k a))
)
(compile-instrument "ccl;output:" "prelude"
pn1
pn2
pn3
)
With this function you could associate symbol, length, tonality and velocity with the same symbol structure. This means that you could use the output of a generator to devise a composition's structure:
(setq form (vector-to-symbol a e (gen-noise-white 20)))